package cn.com.bsoft.cloud.model

import cn.com.bsoft.cloud.entity.RegisterType
import cn.net.xyan.blossom.kotlin.NoArg
import com.fasterxml.jackson.annotation.JsonFormat
import java.math.BigDecimal
import java.util.*

val ScheduleCancel = 0
val ScheduleNew = 1
val ScheduleStop = -1
val ScheduleMiss = -2

enum class ScheduleVendor{

}


@NoArg
open  class ScheduleRecord(val recordID:String,val hospitalCode:String){
    var doctorNo:String? = null
    var doctorName:String? = null

    var deptCode:String? = null
    var deptName:String? = null

    var arrangementCode:String? = null
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    var clinicDate: Date? = null

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    var scheduleTime: Date? = null

    var sequenceNo:String? = null
    var vendor:String? = null
    var registerType: RegisterType? = null
    var status:Int? = null

    var fee: BigDecimal? = null
    var isFirst:Boolean? = null

    var identifyNo:String? = null
    var clinicAddress:String? = null

    var  startTime:String? = null
    var  endTime:String? = null

    var cardNo:String? = null
    var cardType:String? = null

    var payOrderID:String? = null
    var payOrderStatus:Int? = null


    var regSeqNo:String? = null
    var regPayNo:String? = null

    var hisOrderNo:String? = null

    var hisPayPrepared:Boolean? = null

}

@NoArg
class ScheduleRecordEx(recordID:String, hospitalCode:String):ScheduleRecord(recordID,hospitalCode){

    var medicalSatisfaction:String? = null

    var overallSatisfaction:String?= null

    var describe:String?=null

    var patientName:String? = null

    var scheduleVendor:String? = null
}

@NoArg
data class ApplyScheduleReq(val hospitalCode:String,val arrangementCode:String){
    var identifyNo:String? = null
    var cardNo:String? = null
    var cardType:Int? = null
    var patientName:String? = null
    var gender:Int? = null
    var telephone:String? = null
    var fee: BigDecimal? = null
    var username:String? = null
}

@NoArg
data class CancelScheduleReq(val hospitalCode: String,val recordID:String)

@NoArg
data class QuerySchedulePayOrder(val recordID:String,val hospitalCode:String)

@NoArg
data class QueryScheduleRecordReq(val identifyNo:String?,val status:String? = null){
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    var begin: Date? = null
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    var end: Date? = null
    var yyid:String? = null
    var scheduleVendor:String? = "1"
}


@NoArg
class QueryScheduleRecordExReq{
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    var begin: Date? = null
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    var end: Date? = null

    var cardNo:String? = null

    var hospitalCode:String? = null

    var deptCode:String? = null

    var doctorNo:String? = null

    var status:Int? = null

    var medicalSatisfaction:Int?= null

    var overallSatisfaction:Int?= null

    var hisOrderNum:String? = null

    var yyid:String? = null

}

@NoArg
data class UpdateScheduleRecordReq(val yyid:String?=null){
    var medicalSatisfaction:Int? = null
    var overallSatisfaction:Int? = null
    var describe:String? = null
    var orderID:String? = null

    var hisSeqNo:String? = null
    var hisPayNo:String? = null

    var cardNo:String? = null
    var cardType:Int? = null
    var identifyNo:String? = null
    var patientName:String? = null
}

class QueryCancelScheduleReq{
    var hospitalCode:String? = null

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    var begin: Date? = null

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    var end: Date? = null
}

class QueryCancelScheduleRsp{
    var hospitalCode:String? = null
    var yyid:String? = null
    var workId:String? = null
}

class PayScheduleRecordReq{
    var yyid:String? = null
    var username:String? = null
    var forceCreateNew:Boolean? = null
}